package com.yubest.junit.jframe;

import javax.swing.*;

/**
 * 窗体程序
 *
 * @Author: hweiyu
 * @Date: 2022/11/25 15:43
 */
public class MyJFrame extends JFrame {

    private static final long serialVersionUID = -5417234263630054991L;

    public void start() {
        setTitle("Hello JFrame!");
        setVisible(true);
        setSize(300, 300);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

        JLabel jLabel = new JLabel("欢迎光临，你好！");
        jLabel.setHorizontalAlignment(SwingConstants.CENTER);
        getContentPane().add(jLabel);
    }
}
